extends Control

@onready var play_button: Button = $PlayButton
@onready var animation_player: AnimationPlayer = $AnimationPlayer


func _ready() -> void:
	Fade.first_fade()
	Fade.first_fade_finished.connect(_on_fade_first_finished)


func _on_play_button_pressed() -> void:
	UiAudio.play()
	
	play_button.disabled = true
	
	animation_player.play("start_game")
	Fade.change_scene("res://scenes/main.tscn")


func _on_fade_first_finished() -> void:
	play_button.disabled = false
